import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;

import com.centerkey.utils.BareBonesBrowserLaunch;

//import com.centerkey.utils.BareBonesBrowserLaunch;


/**
 * Het about scherm met informatie over ons!!
 * Je hebt de Barebones jar nodig!!!
 * @author Tim en Matthijs en Mr. Barebones..
 */
public class About extends JDialog implements MouseListener,ActionListener{
	
	Cursor c;
	
   public About() {
	   this.setLayout(new BorderLayout());
	   JPanel p = new JPanel();
	   JPanel p2 = new JPanel();
	   JButton b1 = new JButton("Ok");
	   c = p2.getCursor();
	   p2.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
	   
	   getContentPane().add(p,BorderLayout.NORTH);
	   getContentPane().add(p2,BorderLayout.CENTER);
	   getContentPane().add(b1,BorderLayout.SOUTH);
	   
	   JTextArea jt = new JTextArea();
	   jt.append("Deze applicatie is gemaakt door : \n" +
	   		"Teus Versluis, Matthijs Vastenburg, \n" +
	   		"Jeroen Tietema en Tim de Jager \n\n" +
	   		"Voor meer Info ga naar onze site:");
	   jt.setOpaque(false);
	   jt.setEditable(false);
	   p.add(jt);
	   
	   JLabel l1 = new JLabel("<html><a href=#>Blackjack Site</a></html>");
	   p2.setSize(l1.getSize());
	   p2.add(l1);
	   p2.addMouseListener(this);
	   
	   b1.addActionListener(this);
	   
	   setTitle("About");
	   setSize(200,200);
	   setDefaultCloseOperation(DISPOSE_ON_CLOSE);
	   pack();
	   setVisible(true);
	   
	   
	   
      }
   			
			public void mouseClicked(MouseEvent arg0) {
				BareBonesBrowserLaunch.openURL("http://code.google.com/p/iprj4-blackjack");
				
			}
			public void mouseEntered(MouseEvent arg0) {	}
			public void mouseExited(MouseEvent arg0) {	}
			public void mousePressed(MouseEvent arg0) {	}
			public void mouseReleased(MouseEvent arg0) {	}
			public void actionPerformed(ActionEvent arg0) {
				dispose();
				
			}
   }
